﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AnlianCommon.Common.Migrations
{
    public partial class log5 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "SheepArchives",
                columns: table => new
                {
                    RecordId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RecordAuricle = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordCorpuscle = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordMother = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordFather = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordBreed = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordBorn = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    RecordSite = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    RecordRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Sex = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Gene = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordType = table.Column<int>(type: "int", nullable: true),
                    FarmId = table.Column<int>(type: "int", nullable: false),
                    FieldId = table.Column<int>(type: "int", nullable: false),
                    CottageId = table.Column<int>(type: "int", nullable: false),
                    SheepImage = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepArchives", x => x.RecordId);
                });

            migrationBuilder.CreateTable(
                name: "StatusLevels",
                columns: table => new
                {
                    VariousStateId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Stage = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductionGrade = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SalesGrade = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReproductiveState = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ReproductiveStateDays = table.Column<int>(type: "int", nullable: true),
                    PresenceStatus = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsPregnancyTest = table.Column<int>(type: "int", nullable: true),
                    WeanWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    WeanDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    RecordId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_StatusLevels", x => x.VariousStateId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "SheepArchives");

            migrationBuilder.DropTable(
                name: "StatusLevels");
        }
    }
}
